package com.yzc.apis.logClient;

import com.yzc.model.entity.log.InventoryLog;
import com.yzc.model.entity.log.OrderStatusLog;
import com.yzc.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "Log-service")
public interface MainOrderLogClient {
    @PostMapping("/logs/creatOrderLog")
    Result<Boolean> createOrderLog(@RequestBody OrderStatusLog orderLog,
                                   @RequestHeader("Authorization") String authorizationHeader);

    @GetMapping("/getOrderLog/{orderId}")
    Result<Boolean> getOrderLog(@PathVariable("orderId") Long orderId);

    @PostMapping("/logs/creatInventoryLog")
    Result<Boolean> creatInventoryLog(@RequestBody InventoryLog inventoryLog);

    @GetMapping("/logs/getInventoryLog/{orderId}")
    Result<InventoryLog> getInventoryLog(@PathVariable("orderId") Long orderId);
}
